FOR PROGRAMMERS ONLY - THIS IS USELESS IF YOU DON'T USE SYMANTEC C OR C++ AND APPLESCRIPT
This is a quick hack I had to make because AppleScript 1.1 didn't seem to work right with Think Project Manager 7.0. I don't know if anybody else ran into this problem. Please send me a mail if you found a better way to work around it, or if your setup works as it should (so I can try to find what's wrong with mine). I had this problem both on a PowerMac 6100 (italian 7.1.2 with HW Sys Update 3.0) and a Duo 230 (italian 7.1 with HSU 3.0).
I am developing a complex utility which requires building more than 30 TPM projects. Since building 30 projects takes a while, I started using AppleScript to automate the whole task. Everything worked fine until I installed AppleScript 1.1. After that, the line
save project document 1 to file "xxx" as a project type
stopped working. I got plenty of "Think Project Manager got an error: can't make some data into the expected type" (i.e. errAECoercionFail). Recording a "Build code resource…" and playing it back works only until a change is made to the script; as soon as the script is recompiled, the error comes out again. Is there another syntax to make that work? If so, let me know.
I tracked the Apple Events until I figured out that the 'fltp' parameter was being passed with an 'obj ' descriptor instead of a 'type' in the AEPutKeyDesc call. Don't ask me why (maybe something weird in the 'aete'?). I only know that I lost many hours trying to clean up and reinstall my environment with no results.
The patch intercepts the _Pack8 trap and watches for a 0x0610 selector in D0 (AEPutKeyDesc); it checks if the keyword is 'fltp' and the descriptor is an 'obj '. It everything matches it creates a brand new descriptor of type 'type' that contains 4 bytes of data (the 'PRTP' keyword) and replaces the 'obj ' before jumping to the original AEPutKeyDesc. It does NOT dispose the descriptor (it's just a hack and it works fine for me, so what?).
WARNING: this patch doesn't check the environment and prevents ANYONE from creating an 'fltp' with an 'obj ' descriptor. Don't even think of installing it if you don't really need it.
This patch if free and may be freely distributed as long as this documentation is included. I make no warranties on it, so use it at your own risk.